package bean;

import java.math.BigDecimal;

public class Commodity {
    private int commodityId; // 商品编号
    private String commodityName; // 商品名称
    private int categoryId; // 类别编号
    private BigDecimal costPrice; // 成本单价
    private BigDecimal salePrice; // 销售单价
    private int quantity; // 数量
    private String categoryName; // 类别名称

    // 添加的商品对象
    public Commodity(String commodityName, int categoryId, BigDecimal costPrice, BigDecimal salePrice, int quantity) {
        this.commodityName = commodityName;
        this.categoryId = categoryId;
        this.costPrice = costPrice;
        this.salePrice = salePrice;
        this.quantity = quantity;
    }

    // 不显示商品成本价格的商品对象
    public Commodity(int commodityId, String commodityName, int categoryId, BigDecimal salePrice, int quantity, String categoryName) {
        this.commodityId = commodityId;
        this.commodityName = commodityName;
        this.categoryId = categoryId;
        this.salePrice = salePrice;
        this.quantity = quantity;
        this.categoryName = categoryName;
    }

    // 查询的商品对象
    public Commodity(int commodityId, String commodityName, int categoryId, BigDecimal costPrice, BigDecimal salePrice, int quantity, String categoryName) {
        this.commodityId = commodityId;
        this.commodityName = commodityName;
        this.categoryId = categoryId;
        this.costPrice = costPrice;
        this.salePrice = salePrice;
        this.quantity = quantity;
        this.categoryName = categoryName;
    }

    public int getCommodityId() {
        return commodityId;
    }

    public void setCommodityId(int commodityId) {
        this.commodityId = commodityId;
    }

    public String getCommodityName() {
        return commodityName;
    }

    public void setCommodityName(String commodityName) {
        this.commodityName = commodityName;
    }

    public int getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(int categoryId) {
        this.categoryId = categoryId;
    }

    public BigDecimal getCostPrice() {
        return costPrice;
    }

    public void setCostPrice(BigDecimal costPrice) {
        this.costPrice = costPrice;
    }

    public BigDecimal getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(BigDecimal salePrice) {
        this.salePrice = salePrice;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }
}
